JAVA=java
JAVAC=javac
JFLEX=jflex
CUP=$(JAVA) -jar java-cup-11a.jar


test: Main.class

Main.class: Main.java parser/miniJava.java parser/parser.java astDir parserDir pass1Dir
	javac Main.java
  
util/*.class: util/*.java
	javac util/*.java
	
parser/miniJava.java: parser/miniJava.flex
	$(JFLEX) parser/miniJava.flex
	
parser/parser.java: parser/miniJava.cup
	$(CUP) parser/miniJava.cup
	
	
astDir: syntaxTree/*.java
	javac syntaxTree/*.java
	
parserDir: parser/*.java
	javac parser/*.java
	
pass1Dir: pass1/*.java
	javac pass1/*.java
	
clean:
	del *.class 
	del syntaxTree\*.class 
	del parser\parser.java
	
